<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<script>
		{
			let a = 10;
			var b = 1;//全局
		}
		// console.log(a);
		// Uncaught ReferenceError: a is not definedwa
		console.log(b);

		for (var i = 0; i < 10; i++) {
		}
		console.log(i);

		const Pi = 3.14;
		// Pi = 2.4;
		// ES61.html?_ijt=pj0oi…d=RELOAD_ON_SAVE:19 Uncaught TypeError: Assignment to constant variable.
		// const foo;
		// Missing initializer in const declaration

		if (true) {
			const MAX = 5;
		}
		// console.log(MAX);
		// MAX is not defined
	</script>
</head>
<body>

</body>
</html>